<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // 储存一个名字 本地存储只存储字符串
        localStorage.setItem('uname', '刘德华');
        // 获取本地存储
        // const uname = localStorage.getItem('uname');
        // console.log(uname);
        // 修改本地存储
        localStorage.setItem('uname', 'pink');
        console.log(localStorage.getItem('uname'));
        // 删除本地存储
        // localStorage.removeItem('uname');
    </script>
</body>

</html>